<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width = device-width, initial-scale = 1.0, minimum-scale = 1.0, maximum-scale = 1.0, user-scalable = no"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>演示例子</title>

<script src="wsj-top-note.js" type="text/javascript"></script>
</head>
<body>

<div>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum</div>
<br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br>
<button id="aaa">全屏,有关闭按钮,永远不关闭</button><br><br>
<button id="bbb">非全屏,无关闭按钮,2秒关闭,回调函数有2个参数:内容,计数器</button><br><br>
<button id="forclose">强制关闭</button>
<div>the end</div>
<script>
wsjtn.ready(function () {
    wsjtn.topNote('ready后就出现,默认3秒')
})

document.getElementById('aaa').onclick = function () {
    wsjtn.topNote("Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type", { full: true, closeBtn: true, color: 'success', anim: true, center:true,time:0 }, function () { 
        document.title='提示条消失,执行回调'
     })
}

document.getElementById('bbb').onclick = function () {
    wsjtn.topNote("Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type", { full: false, closeBtn: false, color: 'danger', anim: true, center:false,time:2000 }, function (ctx,count) { 
        document.title=count+'~'+ctx
     })
}

document.getElementById('forclose').onclick = function(){
    wsjtn.forceClose()
}
</script>
</body>
</html>
